<template>
  <div>
    <el-dialog
      title="选择关联文章"
      :visible.sync="visible"
      width="896px"
      :before-close="handleClose"
    >
      <demoEdit @saveobj="saveobj"></demoEdit>
    </el-dialog>
  </div>
</template>

<script>
import demoEdit from "@/components/demoEdit/index";

export default {
  components: { demoEdit },
  data() {
    return {
      visible: false,
      callback: function() {},
      num: 0,
      type: null
    };
  },

  methods: {
    handleClose() {
      this.visible = false;
    },
    saveobj(e) {
      // if (e.length > this.num) {
      //   return this.$message.error("请重新选择");
      // }
      if (e.delivery != this.type) {
        return this.$message.error("请重新选择11");
      }
      this.callback(e);
      this.visible = false;
    }
  }
};
</script>

<style></style>
